<template>
  <div style="margin-top: 30px">
<!--    <el-breadcrumb-item style="line-height: 30px" :to="{ path: '/' }">首页</el-breadcrumb-item>-->
<!--    <el-breadcrumb-item style="line-height: 30px;color: red" >{{group}}</el-breadcrumb-item>-->
<!--    <el-breadcrumb-item style="line-height: 30px" >活动列表</el-breadcrumb-item>-->
<!--&lt;!&ndash;    <el-breadcrumb-item style="line-height: 30px" >活动详情</el-breadcrumb-item>&ndash;&gt;-->
  <el-card class="box-card" style="width: 900px;margin: 0 auto">
    <table  style="width: 800px;text-align: center;margin: 0 auto">
      <tr style="background-color:  #b0e0e688">
        <th>物资名称[规格]</th>
        <th>生产厂家</th>
        <th>单价</th>
        <th>数量</th>
        <th>操作</th>
      </tr>
      <tr v-for="material in materialing" :key="material.id"   >
        <td>
          <select v-model="selecting">
            <option v-for="material in materialing" :key="material.id" :value="material.id">{{material.Itemname}}</option>

        </select>
        </td>
        <td>{{material.Manufacturer}}</td>
        <td><input type="text">元</td>
        <td><input type="text">个</td>
        <td>采购</td>
      </tr>
      <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
    </table>
  </el-card>

    <div style="display: flex;width: 900px;height: 100px;border: 1px #dcdfe6 solid;margin: 0 auto;margin-top: 100px">
      <div  style="flex: 50%;padding: 10px">
        <div>供应商名称：

          <select v-model="selecting" >
          <option v-for="material in materialing" :key="material.id" :value="material.id">{{material.Itemname}}</option>

        </select>
        </div>
        <div style="margin-top: 30px">负责人：<input type="text"></div>
      </div>
      <div  style="flex: 50%;padding: 10px">
        <div>合计金额：<input type="text">
        </div>
        <div style="margin-top: 30px">操作员：<input type="text"></div>
      </div>
    </div>
<div style="text-align: center;margin-top: 150px">
  <el-button style="width: 100px;background: linear-gradient(paleturquoise,royalblue)" type="primary" @click="updatepwd">保存</el-button>
  <el-button style="width: 100px;background: linear-gradient(paleturquoise,royalblue)" type="primary" @click="updatepwd">重置</el-button>
</div>
  </div>
</template>

<script>
export default {
  name: "purchase",
  data(){
    return {
      group: this.$route.params.group,
      materialing:{},
      selecting:''
    }
  },
  created() {
  this.$axios.get("/api/material/materials").then(res => {
    console.log(res);
    if(res.data.status===1){
      this.materialing=res.data.data;
      this.selecting = this.materialing[0].id;
    }
  });


},
  methods:{

  }
}
</script>

<style scoped>

</style>